package com.yaoq.factory.simple;

/**
 * @ClassName Factory
 * @Description TODO
 * @Author yaoqiang
 * @Date 2020/9/18 14:38
 * @Version 1.0
 */
public class Factory {
    public static Product createProduct(int type) {
        Product product = null;
        switch (type) {
            case 1:
                product = new ProductA();
            default:
                product = new ProductA();
        }
        return product;
    }
}
